package com.dingyh.shopwebbackground.service.impl;

import com.dingyh.shopwebbackground.entity.Conversation;
import com.dingyh.shopwebbackground.mapper.ConversationMapper;
import com.dingyh.shopwebbackground.service.ConversationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author dingyuhan
 * @since 2023-03-07
 */
@Service
public class ConversationServiceImpl extends ServiceImpl<ConversationMapper, Conversation> implements ConversationService {

    @Autowired
    ConversationMapper conversationMapper;

    @Override
    public List<Conversation> getUserListID(String saleId) {
        return conversationMapper.getUserListID(saleId);
    }

    @Override
    public List<Conversation> getSaleListID(String userId) {
        return conversationMapper.getSaleListID(userId);
    }

    @Override
    public List<Conversation> getNotRead(String saleId, String userId) {
        return conversationMapper.getNotRead(saleId,userId);
    }

    @Override
    public List<Conversation> getTalkingByUserID(String saleId, String userId) {
        return conversationMapper.getTalkingByUserID(saleId,userId);
    }
}
